package com.usian.comment.feign;

import com.usian.model.user.pojos.ApUser;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

@FeignClient(value = "leadnews-user")
public interface UserFeign {

    /**
     * 提供给评论服务做远程调用使用，使用用户的id 返回用户的信息对象
     *
     * @param id
     * @return
     */
    @GetMapping("/api/v1/user/{id}")
    public ApUser findUserById(@PathVariable("id") Integer id);
}
